import request from '@/utils/request'

// 查询保险管理列表
export function listInsurance(query) {
  return request({
    url: '/maintenance/insurance/list',
    method: 'get',
    params: query
  })
}
/* 车辆 */
export function carBasicList(query) {
  return request({
    url: '/car/basic/basicList',
    method: 'get',
    params: query
  })
}
export function carBasicPermissionList(query) {
  return request({
    url: '/car/basic/carBasicPermissionList',
    method: 'get',
    params: query
  })
}
// 查询保险管理详细
export function getInsurance(id) {
  return request({
    url: '/maintenance/insurance/' + id,
    method: 'get'
  })
}
//保险公司
export function insuranceCompanyList(type) {
  return request({
    url: '/maintenance/company/insuranceCompanyList/' + type,
    method: 'get'
  })
}

// 新增保险管理
export function addInsurance(data) {
  return request({
    url: '/maintenance/insurance',
    method: 'post',
    data: data
  })
}
//新增商业险
export function addSyInsurance(data) {
  return request({
    url: '/maintenance/insurance/editSy',
    method: 'put',
    data: data
  })
}
//新增交强险
export function addJqInsurance(data) {
  return request({
    url: '/maintenance/insurance/editJq',
    method: 'put',
    data: data
  })
}
// 修改保险管理
export function updateInsurance(data) {
  return request({
    url: '/maintenance/insurance',
    method: 'put',
    data: data
  })
}

// 删除保险管理
export function delInsurance(id) {
  return request({
    url: '/maintenance/insurance/' + id,
    method: 'delete'
  })
}

// 导出保险管理
export function exportInsurance(query) {
  return request({
    url: '/maintenance/insurance/export',
    method: 'get',
    params: query
  })
}
// 下载保险管理模板
export function downloadTemplate(query) {
  return request({
    url: '/maintenance/insurance/downloadTemplate',
    method: 'get',
	params: query
  })
}
// 下载导入模板
export function importTemplate() {
  return request({
    url: '/maintenance/insurance/importTemplate',
    method: 'get'
  })
}
